import time


def timer(func):
    def call_func(*args, **kwargs):
        start_time = time.time()
        result = func(*args, **kwargs)
        end_time = time.time()
        total_time = end_time - start_time
        print(f"{func.__name__}用时{int(total_time // 60)}分{total_time % 60:.3f}秒")
        return result

    return call_func
